//
//  KKDataItemManager.h
//  Butler
//
//  Created by liaozhenming on 16/7/1.
//  Copyright © 2016年 liaozhenming. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "KKCategoryItem.h"
#import "KKGoodsItem.h"
#import "KKEmployee.h"
#import "KKCustomer.h"

static NSString *KKButlerDataManagerUpdateNotificationNameGoods = @"KKButlerDataManagerUpdateNotificationNameGoods";
static NSString *KKButlerDataManagerUpdateNotificationNameCustomer = @"KKButlerDataManagerUpdateNotificationNameCustomer";
static NSString *KKButlerDataManagerUpdateNotificationNameEmployee = @"KKButlerDataManagerUpdateNotificationNameEmployee";

typedef void(^KKButlerDataSearchDataBlock)(id object);
typedef void(^KKButlerDataUpdateResultBlock)(BOOL finished);

@interface KKButlerDataManager : NSObject

@property (nonatomic, strong) NSArray* arr_categoryItems;   /**< 所有商品分类数据*/
@property (nonatomic, strong) NSArray* arr_customerItems;   /**< 所有客户数据*/

@property (nonatomic, strong) NSArray* arr_employeeItems;   /**< 所有职工数据*/
@property (nonatomic, strong) NSArray* arr_allGoodsItems;   /**< 所有商品数据*/

+ (instancetype)kk_manager;

- (void)kk_updateAllCategoryItems:(KKButlerDataUpdateResultBlock)finishHandle;

- (void)kk_updateAllCustomerItems:(KKButlerDataUpdateResultBlock)finishHandle;

- (void)kk_updateAllEmployeeItems:(KKButlerDataUpdateResultBlock)finishHandle;

- (void)kk_searchAllGoodsItemsWithCategoryId:(NSString*)categoryId result:(KKButlerDataSearchDataBlock)resultHandle;

@end
